//
//  ViewController.m
//  Leveler
//
//  Created by iD Student on 7/10/13.
//  Copyright (c) 2013 iD Student. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	[[UIAccelerometer sharedAccelerometer] setDelegate:self];
    [[UIAccelerometer sharedAccelerometer] setUpdateInterval:.033];
    movingImage.image = [UIImage imageNamed:@"Untitled-3.png"];
}
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
-(void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration
{
    float x = acceleration.x/100;
    float y = acceleration.x/100;
    float z = acceleration.x/100;
    
    movingImage.center = CGPointMake(Center_X + Center_X * x, Center_Y + Center_Y * y);
}
@end
